package edu.gdkm.exceptiondemo;



public class Circle {
    public static void compute(String str) throws RadiusException {
        int r = Integer.parseInt(str);
        if(r < 0){
            throw new RadiusException();
        }else{
            System.out.println("圆的面积是:"+Math.PI * r * r);
        }
    }
}